using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
using JCTimes.DomainModel.Views;


namespace JCTimes.EFRepository.Mapping
{
    public class V_PDALogMap : EntityTypeConfiguration<V_PDALog>
    {
        public V_PDALogMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.ID)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.PDAID)
                .HasMaxLength(50);

            this.Property(t => t.PDANo)
                .HasMaxLength(50);

            this.Property(t => t.LogContent)
                .HasMaxLength(500);

            this.Property(t => t.ConnectFlag)
                          .HasMaxLength(50);

            this.Property(t => t.PortName)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("V_PDALog");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.CreateDate).HasColumnName("CreateDate");
            this.Property(t => t.PDAID).HasColumnName("PDAID");
            this.Property(t => t.PDANo).HasColumnName("PDANo");
            this.Property(t => t.ConnectFlag).HasColumnName("ConnectFlag");
            this.Property(t => t.PortName).HasColumnName("PortName");
            this.Property(t => t.LogContent).HasColumnName("LogContent");
      
        }
    }
}
